package com.claimSettlement.service;

import com.claimSettlement.pojo.Case;
import com.claimSettlement.pojo.Worker;
import com.github.pagehelper.PageInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 出险的openfeginService类
 * 汤英杰
 */
@FeignClient(value = "danger-microservic",path = "/case")
public interface CaseOpenFeginService {
    @RequestMapping("/getCaseAll")
    PageInfo<Case> getCaseAll(@RequestParam("page") int page);
    @RequestMapping(value = "/insertCase",method = RequestMethod.POST,produces = "application/json;charset=UTF-8")
    int insertCase(@RequestBody Case cases);
    @RequestMapping("/updCaseHandling")
    int updCaseHandling(@RequestParam("caseHandling")int caseHandling,@RequestParam("caseState")int caseState,@RequestParam("caseId") String caseId);
    @RequestMapping("/insertWorker")
    int insertWorker(@RequestParam("caseId") String caseId,@RequestParam("userId") int userId,@RequestParam("dispatchedWorkerEndTime") String dispatchedWorkerEndTime);
    @RequestMapping("/getCaseByUserId")
    PageInfo<Case> getCaseByUserId(@RequestParam("userId") int userId,@RequestParam("shuzhi") int shuzhi,@RequestParam("inbh") int inbh,@RequestParam("endtime") int endtime,@RequestParam("page") int page);
    @RequestMapping("/getCaseBycaseId")
    Case getCaseBycaseId(@RequestParam("caseId") String caseId);
    @RequestMapping("/getCaseOne")
    Case getCaseOne(@RequestParam("caseId") String caseId);

    @RequestMapping("/getCaseId")
    PageInfo<Case> getCaseId(@RequestParam("caseId") String caseId,@RequestParam("recognizeeName") String recognizeeName,@RequestParam("plateNumber") String plateNumber,@RequestParam("page") int page);

    @RequestMapping(value = "/updateCase",method = RequestMethod.POST,produces = "application/json;charset=UTF-8")
    int updateCase(@RequestBody Case cases);

    @RequestMapping("/getCaseChul")
    PageInfo<Case> getCaseChul(@RequestParam("page") int page);

    @RequestMapping("/getWorkerAll")
    List<Worker> getWorkerAll();
    @RequestMapping("/getSurveyCountCaseId")
    String getSurveyCountCaseId(@RequestParam("caseId") String caseId);
    @RequestMapping("/getCaseCount")
    public int getCaseCount(@RequestParam("recognizeeId")String recognizeeId, @RequestParam("plateNumber")String plateNumber);
}
